<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <!-- <script src="./index.js"></script> -->
</head>

<body>

    <button id='btn'>11</button>
</body>

</html>
<script type="module">
    import qee from "./index.js"
    //要导出的标题
    const columns = [{
        title: '姓名',
        dataIndex: 'name',
        key: 'obj.name',
    }, {
        title: '年龄',
        dataIndex: 'age',
        key: 'age',
    }, {
        title: '住址',
        dataIndex: 'address',
        key: 'address',
    }]
    //导出的数据
    const dataSource = [{
        key: '1',
        name: 'chenchen',
        obj: {
            name: "李雷"
        },
        age: 32,
        address: '西湖区湖底公园1号'
    }, {
        key: '2',
        name: 'fangfang',
        age: 32,
        address: '西湖区湖底公园2号'
    }, {
        key: '3',
        name: 'lanlan',
        gugug: "aaaa",
        age: 32,
        address: '西湖区湖底公园3号'
    }]

    let btn = document.getElementById('btn')

    btn.onclick = function () {
        // console.log(123)
        qee(columns, dataSource)
    }

</script>